package cn.iocoder.yudao.module.train.controller.admin.student.vo;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.*;
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;

import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

@Schema(description = "管理后台 - 学生用户 Response VO")
@Data
@ExcelIgnoreUnannotated
public class StudentRespVO {

    @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "9248")
    @ExcelProperty("主键")
    private Long id;

    @Schema(description = "学生姓名", example = "王五")
    @ExcelProperty("学生姓名")
    private String studentName;

    @Schema(description = "出生日期")
    @ExcelProperty("出生日期")
    private LocalDateTime studentBirthdate;

    @Schema(description = "年龄")
    @ExcelProperty("年龄")
    private Integer studentAge;


    @Schema(description = "学生性别（0男 1女 2未知）", example = "0")
    @ExcelProperty(value = "学生性别（0男 1女 2未知）", converter = DictConvert.class)
    @DictFormat("system_user_sex") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Integer studentSex;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;


    @Schema(description = "用户id")
    @ExcelProperty("用户id")
    private Long userId;

    @Schema(description = "手机号码")
    @JsonProperty("studentPhoneNumber")
    @ExcelProperty("手机号码")
    private String studentPhoneNumber;

    @Schema(description = "openId")
    @JsonProperty("uOpenId")
    @ExcelProperty("openId")
    private String uOpenId;

    @Schema(description = "头像地址")
    @JsonProperty("uAvatar")
    @ExcelProperty("头像地址")
    private String uAvatar;

    @Schema(description = "用户名")
    @JsonProperty("uName")
    @ExcelProperty("用户名")
    private String uName;

    @Schema(description = "会员标识")
    @JsonProperty("vipFlag")
    @ExcelProperty("会员标识")
    private Integer vipFlag;

    @Schema(description = "帐号状态（0正常 1停用）", example = "1")
    @ExcelProperty(value = "帐号状态（0正常 1停用）", converter = DictConvert.class)
    @DictFormat("train_account_status") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    @JsonProperty("uStatus")
    private Integer uStatus;

    @Schema(description = "会员到期时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    @JsonProperty("expireTime")
    @ExcelProperty("会员到期时间")
    private LocalDateTime expireTime;

}
